package com.zhiyou10.crowdfunding.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou10.crowdfunding.service.IProjectsService;
import com.zhiyou10.crowdfunding.vo.Projects;
import com.zhiyou10.crowdfunding.vo.mapper.ProjectsMapper;

@Service
public class ProjectsServiceImpl implements IProjectsService {
	@Autowired
	private ProjectsMapper mapper;

	@Override
	public boolean add(Projects vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doCreate(vo);
	}

	@Override
	public Projects getUsId(Integer usId) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Projects getType(Integer type) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Projects getPstId(Integer pstId) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Projects> list() throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAll();
	}

	@Override
	public List<Projects> findAllSplit(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllSplit(map);
	}

	@Override
	public Projects get(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findById(id);
	}

	@Override
	public boolean edit(Projects vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doUpdate(vo);
	}

	@Override
	public List<Projects> lists(String name) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findByName(name);
	}

	@Override
	public Long findAllCount11(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllCount11(map);
	}

	@Override
	public Long findAllCount() throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllCount();
	}

	@Override
	public Projects getOne(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findBy(id);
	}

	@Override
	public boolean editRecommend(Projects vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doUpdateRecommend(vo);
	}

	@Override
	public List<Projects> findAllSplitTerm1(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllSplitTerm(map);
	}

	@Override
	public List<Projects> findAllSplitTermpType(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllSplitTermpType(map);
	}

	@Override
	public Long max(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.max(map);
	}

	@Override
	public Long sum(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.sum(map);
	}

}
